module ActiveSupport  #:nodoc: all
  class BufferedLogger
    def << input
      add(DEBUG, input)
    end
  end
end

module LinkToWithBlock  #:nodoc:
  def self.included(base)
    base.class_eval { alias_method_chain :link_to, :block }
  end
  
  def link_to_with_block(*args, &block)
    return link_to_without_block(*args) unless block_given?
    concat(link_to_without_block(*[capture(&block)] + args), block.binding)
  end
end

ActionView::Helpers::UrlHelper.module_eval do
  include LinkToWithBlock
end
